<?php

namespace App\Http\Resources\Passengers;

use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use JsonSerializable;

class PassengersResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param Request $request
     *
     * @return array|Arrayable|JsonSerializable
     */
    public function toArray($request)
    {
        return [
            'age'            => $this->age,
            //            'birth_day'      => $this->birth_day,
            'identity_type'  => $this->identity_type,
            'identity_code'  => $this->hidden_identity_code,
            'is_invite'      => $this->is_invite,
            'mobile'         => $this->mobile,
            'passenger_id'   => $this->passenger_id,
            'passenger_type' => $this->passenger_type,
            'truename'       => $this->truename,
            'first_name'     => $this->first_name,
            'last_name'      => $this->last_name,
            'verify_state'   => $this->verify_state,
        ];
    }
}
